#!/bin/bash

# Wan2.1-T2V API Curl示例
# 简单的API测试命令

API_URL="${API_URL:-http://localhost:8000}"

echo "=========================================="
echo "Wan2.1-T2V API Curl示例"
echo "API地址: $API_URL"
echo "=========================================="

# 健康检查
echo ""
echo "1. 健康检查:"
echo "curl $API_URL/health"
echo ""
curl -s "$API_URL/health" | jq '.'

# 提交任务示例
echo ""
echo "2. 提交视频生成任务:"
echo ""
cat << 'EOF'
curl -X POST http://localhost:8000/v1/video/submit \
  -H "Content-Type: application/json" \
  -d '{
    "model": "Wan2.1-T2V-14B",
    "prompt": "Two anthropomorphic cats in comfy boxing gear and bright gloves fight intensely on a spotlighted stage.",
    "num_inference_steps": 50,
    "seed": 42
  }'
EOF

# 查询状态示例
echo ""
echo ""
echo "3. 查询任务状态:"
echo "curl http://localhost:8000/v1/video/status/REQUEST_ID"

# 下载视频示例
echo ""
echo ""
echo "4. 下载生成的视频:"
echo "curl http://localhost:8000/v1/video/download/REQUEST_ID -o output.mp4"

echo ""
echo "=========================================="
echo "完整测试请运行: make test"
echo "=========================================="
